package com.kirk.cts.webservice.manager.beans;

/**
 * <p> UserBean.java </p>
 *
 * @version 1.0.0
 * @Author kirkliu
 * @Date 2020-08-29 22:34
 * @Description 用户信息值对象
 */
public class UserBean extends BaseBean {
    // primary key
    private Integer id;

    private String username;
    private String password;
    private String email;
    private java.util.Date registerTime;
    private String registerIp;
    private java.util.Date lastLoginTime;
    private String lastLoginIp;
    private Integer loginCount;
    private Integer rank;
    private Long uploadTotal;
    private Integer uploadSize;
    private Boolean admin;
    private Boolean viewonlyAdmin;
    private Boolean selfAdmin;
    private Boolean disabled;
    private Integer gatherSize;
    private Integer gatherTotal;
    private Integer allowPerDayGatherSize;
    private Boolean isAllowPerDayGather;
    private Boolean isLoginSuccess;
    private String errorMsg;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public java.util.Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(java.util.Date registerTime) {
        this.registerTime = registerTime;
    }

    public String getRegisterIp() {
        return registerIp;
    }

    public void setRegisterIp(String registerIp) {
        this.registerIp = registerIp;
    }

    public java.util.Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(java.util.Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }

    public Integer getLoginCount() {
        return loginCount;
    }

    public void setLoginCount(Integer loginCount) {
        this.loginCount = loginCount;
    }

    public Integer getRank() {
        return rank;
    }

    public void setRank(Integer rank) {
        this.rank = rank;
    }

    public Long getUploadTotal() {
        return uploadTotal;
    }

    public void setUploadTotal(Long uploadTotal) {
        this.uploadTotal = uploadTotal;
    }

    public Integer getUploadSize() {
        return uploadSize;
    }

    public void setUploadSize(Integer uploadSize) {
        this.uploadSize = uploadSize;
    }

    public Boolean getAdmin() {
        return admin;
    }

    public void setAdmin(Boolean admin) {
        this.admin = admin;
    }

    public Boolean getViewonlyAdmin() {
        return viewonlyAdmin;
    }

    public void setViewonlyAdmin(Boolean viewonlyAdmin) {
        this.viewonlyAdmin = viewonlyAdmin;
    }

    public Boolean getSelfAdmin() {
        return selfAdmin;
    }

    public void setSelfAdmin(Boolean selfAdmin) {
        this.selfAdmin = selfAdmin;
    }

    public Boolean getDisabled() {
        return disabled;
    }

    public void setDisabled(Boolean disabled) {
        this.disabled = disabled;
    }

    public Integer getGatherSize() {
        return gatherSize;
    }

    public void setGatherSize(Integer gatherSize) {
        this.gatherSize = gatherSize;
    }

    public Integer getGatherTotal() {
        return gatherTotal;
    }

    public void setGatherTotal(Integer gatherTotal) {
        this.gatherTotal = gatherTotal;
    }

    public Integer getAllowPerDayGatherSize() {
        return allowPerDayGatherSize;
    }

    public void setAllowPerDayGatherSize(Integer allowPerDayGatherSize) {
        this.allowPerDayGatherSize = allowPerDayGatherSize;
    }

    public Boolean getIsAllowPerDayGather() {
        return isAllowPerDayGather;
    }

    public boolean isAllowPerDayGather() {
        int allowPerDay = getAllowPerDayGatherSize();
        if (allowPerDay == 0) {
            return true;
        }
        return allowPerDay > getGatherSize();
    }

    public void setIsAllowPerDayGather(Boolean isAllowPerDayGather) {
        this.isAllowPerDayGather = isAllowPerDayGather;
    }

    /**
     * @return the isLoginSuccess
     */
    public Boolean getIsLoginSuccess() {
        return isLoginSuccess;
    }

    /**
     * @param isLoginSuccess the isLoginSuccess to set
     */
    public void setIsLoginSuccess(Boolean isLoginSuccess) {
        this.isLoginSuccess = isLoginSuccess;
    }

    /**
     * @return the errorMsg
     */
    public String getErrorMsg() {
        return errorMsg;
    }

    /**
     * @param errorMsg the errorMsg to set
     */
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }


}
